package com.dwms.feign.seller;

import com.dwms.entity.PageResponse;
import com.dwms.entity.QueryRequest;
import com.dwms.entity.Result;
import com.dwms.entity.base.sellerInfo.request.SellerInfoQueryRequest;
import com.dwms.entity.base.sellerInfo.request.SellerInfoRequest;
import com.dwms.entity.base.sellerInfo.response.SellerInfoResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @ClassName: SellerInfoController
 * @Description: SellerInfo
 * @Create 2025-08-27 14:41:01
 * @Author WH
 * @Since 1.0.0
**/

@FeignClient(value = "base-server", path = "/sellerInfo")
public interface SellerInfoFeignClient {

    /**
     * 保存
     *
     * @param sellerInfoRequest
     *          请求参数
     * @return
     */
    @PostMapping("/save")
    Result save(@RequestBody SellerInfoRequest sellerInfoRequest);

    /**
     * 修改
     *
     * @param sellerInfoRequest
     *          请求参数
     * @return
     */
    @PostMapping("/update")
    Result update(@RequestBody SellerInfoRequest sellerInfoRequest);
    

    /**
     * 分页查询
     *
     * @param query
     *          查询参数
     * @return
     */
    @PostMapping("/findPage")
    Result<PageResponse<SellerInfoResponse>> findPage(@RequestBody SellerInfoQueryRequest query);

    /**
     *  根据ID查询
     *
     * @param query
     *          参数
     * @return
     */
    @PostMapping("/findById")
    Result findById(@RequestBody QueryRequest query);

    /**
     * 删除
     *
     * @param query
     *          ID
     * @return
     */
    @PostMapping("/delete")
    Result delete(@RequestBody QueryRequest query);

    /**
     * 查询列表
     * @param query
     * @return
     */
    @PostMapping("/findList")
    Result<List<SellerInfoResponse>> findList(@RequestBody SellerInfoQueryRequest query);
}
